package cn.maihe.elg.operation.model.enums;


/**
 * 收单机构交易流水（银联）
 * Created on 2018/7/16
 *（'核验标志(0-未核验,1-核验一致,2-核验不匹配)',
 * @author by Benjamin.Huang
 */
public enum ValidFlagEnum {

    /**
     *No verification
     */
    NO_VERFICATION("0", "未核验"),
    /**
     *Check consistency
     */
    CHECK_CONSISTENCY("1", "核验一致"),
    /**
     *Check mismatch
     */
    CHECK_MISMATCH("2", "核验不匹配");

    private String value;
    private String label;

    ValidFlagEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }
    public static boolean contains(String type){
        for(ValidFlagEnum typeEnum : ValidFlagEnum.values()){
            if(typeEnum.value.equals(type)){
                return true;
            }
        }
        return false;
    }
    public static String getValue(String type){
        for(ValidFlagEnum typeEnum : ValidFlagEnum.values()){
            if(typeEnum.value.equals(type)){
                return typeEnum.label;
            }
        }
        return "";
    }
    public String getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }


}
